USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_CREA TABLA EXCEL]    Script Date: 11/28/2011 12:21:57 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0003_CREA TABLA EXCEL]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0003_CREA TABLA EXCEL]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_CREA TABLA EXCEL]    Script Date: 11/28/2011 12:21:57 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[WASP_M0003_CREA TABLA EXCEL]

AS
BEGIN
	if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[prima_comision]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	begin
	 drop table [dbo].[prima_comision]
	end

	CREATE TABLE [dbo].[prima_comision] (
		AGCOLOC Decimal (3,0), 
		NROCREDITO Decimal (9,0), 
		MODULO VarChar (2), 
		TIPO_OPER VarChar (20), 
		FOLIO Decimal (8,0), 
		MONEDA VarChar (2), 
		FECGRAB VarChar (8), 
		FECHCOLOC VarChar (8), 
		MTOBRUTO Decimal (11,0), 
		MTOLIQ Decimal (11,0), 
		IMPTO Decimal (9,0), 
		DESG Decimal (9,0), 
		PROTECC Decimal (9,0), 
		VIDA Decimal (9,0), 
		CESANTIA Decimal (9,0), 
		SALUD Decimal (9,0),
		NOTARIA Decimal (9,0), 
		TASA Decimal (8,4), 
		PLAZO Decimal (3,0), 
		CUOTA Decimal (8,0), 
		RUTDEUD Decimal (8,0), 
		NOMDEUD VarChar (50), 
		FECHNAC VarChar (8), 
		DVDEUD VarChar (1), 
		DESIT VarChar (2), 
		SEXO VarChar (1) )

END
GO

